Skip to content

Add methods to retrieve item information and list items#52

Open
khaled-0 wants to merge 1 commit intoCyklet:masterfrom
khaled-0:patch-1
Open

Add methods to retrieve item information and list items#52
khaled-0 wants to merge 1 commit intoCyklet:masterfrom
khaled-0:patch-1

Conversation

@khaled-0
Copy link

No description provided.

@Cyklet
Copy link
Owner

Cyklet commented Dec 17, 2025

I was wondering about the reasoning behind giving direct public access to ItemInformation functions? these items are short-lived and can disappear as soon as a download ends or fails. For item information, you should use the observe(with:) method, which provides up-to-date state and live updates.

@khaled-0
Copy link
Author

I was wondering about the reasoning behind giving direct public access to ItemInformation functions? these items are short-lived and can disappear as soon as a download ends or fails. For item information, you should use the observe(with:) method, which provides up-to-date state and live updates.

If at any point we need to show running processes without having to clone the data and using listeners.

Just a fire off and go thing.

Personally I'm using these data internally in a flutter plugin I'm developing. Where I presist completed records to disk with listeners.

But I didn't like the idea of updating my db on every listener event. so I just added these methods to retrieve them from memory.

Guess I could also just make a local copy in ram.

But still there's one usecase where

I need to retrieve currently running downloads and show them. So can't depend on the callbacks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants